<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>无标题文档</title>
        <link href="/houtai/css/style.css" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="//apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
        <script type="text/javascript">
        $(function()
        {
            //导航切换
            $(".menuson .header").click(function()
            {
                var $parent = $(this).parent();
                $(".menuson>li.active").not($parent).removeClass("active open").find('.sub-menus').hide();

                $parent.addClass("active");
                if (!!$(this).next('.sub-menus').size())
                {
                    if ($parent.hasClass("open"))
                    {
                        $parent.removeClass("open").find('.sub-menus').hide();
                    }
                    else
                    {
                        $parent.addClass("open").find('.sub-menus').show();
                    }


                }
            });

            // 三级菜单点击
            $('.sub-menus li').click(function(e)
            {
                $(".sub-menus li.active").removeClass("active")
                $(this).addClass("active");
            });

            $('.title').click(function()
            {
                var $ul = $(this).next('ul');
                $('dd').find('.menuson').slideUp();
                if ($ul.is(':visible'))
                {
                    $(this).next('.menuson').slideUp();
                }
                else
                {
                    $(this).next('.menuson').slideDown();
                }
            });
        })

        </script>
    </head>

    <body style="background:#fff3e1;">
        <!-- <div class="lefttop"><span></span>通讯录</div> -->
        <dl class="leftmenu">
            <?php foreach ($category_list as $k => $v): ?>
                <dd>
                    <div class="title">
                        <span><img src="/houtai/images/leftico01.png" /></span>
                        <?php echo $v['title']; ?>
                    </div>
                    <ul class="menuson">
                        <?php foreach ($v['child'] as $kk => $vv): ?>
                            <li>
                                <div class="header">
                                    <cite></cite>

                                    <a href="<?php echo empty($vv['link'])?'javascript:;':base_url(ADMIN_DIR.$vv['link']); ?>" 
                                        target="rightFrame">
                                        <?php echo $vv['title']; ?>
                                    </a>
                                    <i></i>
                                </div>
                                <?php if(!empty($vv['child']) && is_array($vv['child'])): ?>
                                    <ul class="sub-menus">
                                        <?php  foreach($vv['child'] as $kkk=>$vvv): ?> 
                                            <li>
                                                <a href="<?php echo empty($vvv['link'])?'javascript:;':base_url(ADMIN_DIR.$vvv['link']); ?>" 
                                                    target="rightFrame">
                                                    <?php echo $vvv['title']; ?>
                                                </a>
                                            </li>
                                        <?php endforeach;?>
                                    </ul>
                                <?php endif;  ?>
                            </li>
                        <?php endforeach ?>
                        <!-- <li class="active"> -->
                    </ul>
                </dd>
            <?php endforeach; ?>
        </dl>
    </body>

</html>

